<template>
    <div>
        <mavon-editor v-model="content" ref="md" @change="change" style="min-height: 600px" />
    </div>
</template>

<script>
import axios from 'axios'
import { mavonEditor } from 'mavon-editor'
// 引入编辑器样式 
import 'mavon-editor/dist/css/index.css'
export default {
    data() {
        return {
            content:'', // 输入的markdown
            html:'',    // 转成的html  
        }
    },
    methods: {
        change(value, render) {
            //实时获取转成html的数据
            this.html = render
            console.log(this.html)
        },
    },
    components: {
        mavonEditor
    },
    created() {
        
    },
}
</script>